package exam_8_22;

import java.util.HashMap;
import java.util.Map;

public class HashMap_34 {
    //    键是Integer 值是String，存储三对元素，然后遍历；
    public static void main(String[] args) {
        Map<Integer, String> map = new HashMap<>();
        map.put(1, "a");
        map.put(2, "b");
        map.put(3, "c");
        for (Integer key :
                map.keySet()) {
            System.out.println(key+" "+map.get(key));

        }

    }
}
